<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="EditProductPricing.ascx.cs" Inherits="UCommerce.Web.UI.Catalog.EditProductPricing" %>
<%@ Register tagPrefix="commerce" tagName="ValidationSummary" src="../Controls/ValidationSummaryDisplay.ascx" %>
<%@ Import Namespace="UCommerce.EntitiesV2"%>

<commerce:ValidationSummary runat="server" />

<div class="propertyPane">
    <commerce:BulkEditGridView runat="server" ID="PriceGroupGridView" BulkEdit="true" DataSource="<%# PriceGroups %>" ShowHeader="false" DataKeyNames="PriceGroupId" AutoGenerateColumns="false" GridLines="None">
        <Columns>
            <asp:TemplateField HeaderText="Enabled">
                <EditItemTemplate>
                    <asp:HiddenField runat="server" ID="PriceGroupIdHiddenField" Value="<%# ((PriceGroup)Container.DataItem).PriceGroupId %>" />
                </EditItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Name">
                <EditItemTemplate>
                    <strong style="margin-right:50px;"><%# ((PriceGroup)Container.DataItem).Name %></strong>
                </EditItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Price">
                <EditItemTemplate>
                    <asp:TextBox runat="server" ID="ProductPriceTextBox" Text="<%# GetPriceForPriceGroup(((PriceGroup)Container.DataItem).PriceGroupId) %>" CssClass="amountInput"></asp:TextBox>
                </EditItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField>
                <EditItemTemplate>
                    <strong><%# ((PriceGroup)Container.DataItem).Currency.ISOCode %></strong>
                </EditItemTemplate>
            </asp:TemplateField>
        </Columns>
    </commerce:BulkEditGridView>
</div>